<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=1200, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <img src="../img/code.png" alt="LOGO" id='imgLogo' />
    <script>
        const oLogo = document.querySelector('#imgLogo');

        oLogo.addEventListener('load',(e)=> {
            window.alert('我在加载图像！');
        })
    </script>
</body>
</html>